<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui">

<ui:composition template="_patrimonio.xhtml">
	<ui:define name="corpo">

		<div id="conteudo">

			<h:form id="form">

				<h2>
					<h:outputText value="CADASTRAR ITEM" />
				</h2>
				<hr />
				
				

				<p:messages id="msg" />
				
				<p:fieldset legend="Dados do Material">
				
				<h:panelGrid columns="3">
					
				<h:outputLabel value="Descrição: " for="nome" />
				<p:inputText id="nome" value="#{materialBean.material.nome}" required="true" requiredMessage="Preencha o campo Nome" style="width: 400px">
					<f:ajax event="change" />
				</p:inputText><br /><br /><br />
				
				<h:outputLabel value="Tipo: " for="tipo" />
				<p:inputText id="tipo" value="#{materialBean.material.tipo}" required="true" requiredMessage="Preencha o campo Tipo" >
					<f:ajax event="change" />
				</p:inputText><br /><br /><br /><br />

				<p:commandButton id="grava" value="GRAVAR" action="#{materialBean.grava}" ajax="false" image="ui-icon-disk">
					<f:ajax render="@all" />
				</p:commandButton>	

				<p:button id="reset" type="reset" value="LIMPAR"  />
				
				</h:panelGrid>
							
				</p:fieldset>
								
				</h:form>
							
		</div>


	</ui:define>
</ui:composition>
</html>